﻿using System;
using System.Collections.Generic;

using System.Linq.Expressions;

namespace UnitOfWork
{
    public interface IRepository<T> where T : class
    {
        void Add(T entity);
        void Update(T entity);
        void Delete(T entity);
        void Delete(Expression<Func<T, bool>> where);
        T FindById(long id);
        T FindById(string id);
        T Get(Expression<Func<T, bool>> where);
        IEnumerable<T> FindAll();
        IEnumerable<T> Find(Expression<Func<T, bool>> where);
        IEnumerable<T> Find(string where);
    }
}
